import Vue from 'vue'
import App from './App.vue'
import router from './router'

// 配置elementui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);


// 配置Axios
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)


// 配置socket
import SocketIO from 'socket.io-client';
import VueSocketIO from 'vue-socket.io';
import api from '/src/utils/api.js'
Vue.use(new VueSocketIO({
  debug: true,
  connection: SocketIO(api.api) 
}));




// 允许跨域携带cookie
axios.defaults.withCredentials = true
//axios.get('http://server.com', {withCredentials: true})

// 阻止启动生产消息
Vue.config.productionTip = false


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
